package com.tbit.main.service.impl;

import com.tbit.main.dao.stat.AccountSumStatDao;
import com.tbit.main.pojo.AccountSumStat;
import com.tbit.main.service.AccountSumStatService;
import com.tbit.main.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author LMY
 * @create 2023-02-07 15:34
 */
@Service
public class AccountSumStatServiceImpl implements AccountSumStatService {

    @Autowired
    private AccountSumStatDao accountSumStatDao;

    @Override
    public List<AccountSumStat> getAccountIdsTypeDate(List<Integer> accountIds, Integer dataType, String date) {
        Map<String, Object> map = new HashMap<>();
        map.put("accountIds", StringUtil.getListString(accountIds));
        map.put("dataType", dataType);
        map.put("date", date);
        return accountSumStatDao.getAccountIdsTypeDate(map);
    }
}
